package com.nkym.wypan.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nkym.wypan.model.context.recycle.RecyclePageContext;
import com.nkym.wypan.model.context.userfile.QueryUserFileContext;
import com.nkym.wypan.model.context.userfile.SearchContext;
import com.nkym.wypan.model.entity.UserFile;
import com.nkym.wypan.model.resp.userfile.QueryUserFileVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @author 19637
 * @description 针对表【wy_pan_user_file】的数据库操作Mapper
 * @createDate 2023-06-07 18:38:09
 * @Entity generator.domain.UserFile
 */
@Mapper
public interface UserFileMapper extends BaseMapper<UserFile> {

    List<String> selectDuplicateName(@Param("userId") Long userId, @Param("parentId") Long parentId, @Param("folderFlag") Integer folderFlag);

    List<QueryUserFileVo> list(@Param("context") QueryUserFileContext context);

    void renameFile(@Param("fileId") Long fileId, @Param("newFilename") String newFilename);

    List<UserFile> search(@Param("searchContext") SearchContext searchContext);

    List<UserFile>  recyclePageList(@Param("context") RecyclePageContext context);

    List<UserFile> queryFileByParentId(@Param("parentId")Long parentId);
}




